<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>使用JSX语法</title>
     <!-- 1. 引入react核心库 -->
     <script src="./node_modules/react/umd/react.development.js"></script>
     <!-- 2. 引入react-dom 用于支持react操作dom -->
     <script src="./node_modules/react-dom/umd/react-dom.development.js"></script>
     <script src="./node_modules/@babel/standalone/babel.min.js"></script>
     <div id="box"></div>
     <script type="text/babel">
        console.log(React);
        let count=100
        let item=<React.Fragment>
            <div className='item'>
                <h2 className='title'>中奖列表</h2>
                <p>总数：{count}</p>
            </div>
        </React.Fragment>
         // 4. 创建根节点
       let root = ReactDOM.createRoot(document.getElementById('box'))
       // 5. 把虚拟dom渲染到页面中
          root.render(item)
     </script>
</head>
<body>
    
</body>
</html>